#include<iostream>
#include<string>
#include<vector>
#include"(new)RBTree.h"
using namespace std;

void test1()
{
	BRTree<int, int> obj;
	int arr[] = { 1,9,5,7,3,6,2,8,4 };
	for (auto au : arr)
	{
		obj.Insert({ au,au });
	}
	obj.MidTrave();

	cout << obj.BlanceTree();
}

void test2()
{
	srand(time(0));
	BRTree<int, int> obj;
	int count = 100000 ;
	vector<int> v;
	v.reserve(count);
	for (int i = 0; i < count; i++)
	{
		v.push_back(rand() + i);
	}

	for (auto& au : v)
	{
		obj.Insert({au,au});
	}

	cout << obj.BlanceTree();
}

int main()
{
	test1();
	//test2();

	cout << endl << "hello , my boy !!!" ;
	return 0;
}